﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xtensive.Storage;
using Xtensive.Integrity.Aspects.Constraints;

namespace SMS.Core.Model.Data
{
    class Order_payment : Entity
    {
        [Key, Field(Length = 30)]
        public string or_no { get; set; }

        [Field]
        public EntitySet<Cust_order> cust_orders { get; set; }
        //TODO: order_payment consist of many cust_orders.. aw tama ba? or bali?

        [Field]
        public Payment payment { get; set; }//TODO: an order_payment is to one payment? tama?

        [Key, Field]
        public int order_no { get; private set; }

        [Field(Precision = 2), RangeConstraint(Min = 0)]
        public decimal amount { get; set; }
    }
}
